import React, { Component, PropTypes } from 'react'
import { TabBar,Icon } from 'antd-mobile'
import hhistory from '../history'

class Footer extends Component{
	render(){
		return(
			<TabBar
        unselectedTintColor="#949494"
        tintColor="#fd8900"
        barTintColor="white"
        hidden={ this.props.crtroute.pathname === '/' }
      >
          <TabBar.Item
            title="首页"
            key="首页"
            icon={<Icon style={{ color:"#5e5f6e" }} type={require( './assets/ic_tab_shouye.svg' )} size={"sm"}/>}
            selectedIcon={<Icon style={{ color:"#fd8900" }} type={require( './assets/ic_tab_shouye.svg' )} size={"sm"}/>}
            selected={ this.props.crtroute.pathname === '/main' }
            onPress={() => {
              hhistory.push( "/main" )
            }}
          >
            
          </TabBar.Item>
          <TabBar.Item
            icon={<Icon style={{ color:"#5e5f6e" }} type={require( './assets/ic_tab_xiaoxi.svg' )} size={"sm"}/>}
            selectedIcon={<Icon style={{ color:"#fd8900" }} type={require( './assets/ic_tab_xiaoxi.svg' )} size={"sm"}/>}
            title="消息"
            key="消息"
            selected={ this.props.crtroute.pathname === '/message' }
            onPress={() => {
              hhistory.push( "/message" )
            }}
          >

          </TabBar.Item>
          <TabBar.Item
            icon={<Icon style={{ color:"#5e5f6e" }} type={require( './assets/ic_tab_yingyong.svg' )} size={"sm"}/>}
            selectedIcon={<Icon style={{ color:"#fd8900" }} type={require( './assets/ic_tab_yingyong.svg' )} size={"sm"}/>}
            title="应用"
            key="应用"
            selected={ this.props.crtroute.pathname === '/appPage' }
            onPress={() => {
              hhistory.push( "/appPage" )
            }}
          >
            
          </TabBar.Item>
          <TabBar.Item
            icon={<Icon style={{ color:"#5e5f6e" }} type={require( './assets/ic_tab_shanghu.svg' )} size={"sm"}/>}
            selectedIcon={<Icon style={{ color:"#fd8900" }} type={require( './assets/ic_tab_shanghu.svg' )} size={"sm"}/>}
            title="商户"
            key="商户"
            selected={ this.props.crtroute.pathname === '/tenant' }
            onPress={() => {
              hhistory.push( "/tenant" )
            }}
          >
            
          </TabBar.Item>
          <TabBar.Item
            icon={<Icon style={{ color:"#5e5f6e" }} type={require( './assets/ic_tab_wode.svg' )} size={"sm"}/>}
            selectedIcon={<Icon style={{ color:"#fd8900" }} type={require( './assets/ic_tab_wode.svg' )} size={"sm"}/>}
            title="我"
            key="我"
            selected={ this.props.crtroute.pathname === '/mine' }
            onPress={() => {
              hhistory.push( "/mine" )
            }}
          >
            
          </TabBar.Item>
      </TabBar>
		)
	}

}

export default Footer